package com.jsoft.jsofted.platform.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.diboot.core.mapper.BaseCrudMapper;
import com.jsoft.jsofted.platform.entity.ProjectInfoEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProjectInfoMapper extends BaseCrudMapper<ProjectInfoEntity> {
    int insertInitializedData(ProjectInfoEntity params);
    /**
     * mybatis查询-分页
     * @param projectInfoEntity
     * @return 查询结果
     */
    List<ProjectInfoEntity> selectProjectInfoEntityList(Page<ProjectInfoEntity> page,
                                                        @Param("projectInfoEntity") ProjectInfoEntity projectInfoEntity);

    /**
     * mybatis插入
     * @param projectInfoEntity
     * @return 插入数量
     */
    int insertProjectInfoEntity(ProjectInfoEntity projectInfoEntity);

    /**
     * mybatis更新(依据id)
     * @param projectInfoEntity
     * @return 更新数量
     */
    int updateProjectInfoEntity(ProjectInfoEntity projectInfoEntity);

    /**
     * 删除
     * @param id
     * @return 删除数量
     */
    int deleteProjectInfoEntityById(@Param("id") Long id);

    /**
     * 删除-批量
     * @param ids
     * @return 删除数量
     */
    int deleteProjectInfoEntityByIds(@Param("ids") List<Long> ids);
}
